let input_arr = [`100311`]

let arr = new Array(10)
arr.fill(0)

let num = input_arr[0]
for(let c of num)
    {
        let c_num = parseInt(c)
        arr[c_num]++
    }
for (let i = 0;i < arr.length;i++)
    {
        if(arr[i]>0)
            {
                console.log(`${i}:${arr[i]}`)
            }
    }